Saved search structures
The default XML structure of a saved search (aka pointer file) in Axiell can be seen in the following example:
<adlibXML> <recordList> <record> <number>3</number> <title>My collection</title> <selection/> <owner>bert</owner> <hits>5</hits> <created>2010-07-23T08:29:41</created> <modified>2010-07-23T08:29:41</modified> <frequency/> <subject/> <expires>1970-01-01T00:00:00</expires> <prunemode>0</prunemode> <hit>2</hit> <hit>38</hit> <hit>172</hit> <hit>176</hit> <hit>179</hit> <accesslist> <access> <name>erik</name> <rights>3</rights> </access> </accesslist> </record> </recordList> <diagnostic> <hits>0</hits> <xmltype>Undefined</xmltype> </diagnostic> </adlibXML>
Of course, the number of hits depends on the saved search, and the access list is only present if access rights have been assigned to the saved search.
(If some kind of user authentication for the WebAPI application has been set up, any access rights returned in the access list of saved searches are used by wwwopac.ashx to determine if the user of the current session is allowed access to the relevant saved search, and if so, to which degree.)
A second XML saved search structure is available for use with the WebAPI. By specifying xmltype=structured
in the wwwopac.ashx request, the same saved search is retrieved in this particular structure. The difference is in the hit list.
<adlibXML> <recordList> <record> <number>3</number> <title>My collection</title> <selection/> <owner>bert</owner> <hits>5</hits> <created>2010-07-23T08:29:41</created> <modified>2010-07-23T08:29:41</modified> <frequency/> <subject/> <expires>1970-01-01T00:00:00</expires> <prunemode>0</prunemode> <hitlist> <record priref="2"/> <record priref="38"/> <record priref="172"/> <record priref="176"/> <record priref="179"/> </hitlist> <accesslist> <access> <name>erik</name> <rights>3</rights> </access> </accesslist> </record> </recordList> <diagnostic> <hits>0</hits> <xmltype>Undefined</xmltype> </diagnostic> </adlibXML>
The advantage of the structured XML type is that the <record> nodes underneath the <hitlist> node may contain custom XML documents to store metadata about the record in this saved search. This is of particular use if a record has different aspects, and you would like to have each record/aspect combination to appear in the saved search. In the default XML type this is not possible since a record can only appear once in a saved search. Although In the structured XML type a record can still only appear once, you are now able to include your own XML document to list all aspects separately. For example, suppose you have a record describing a movie, and of this movie you have selected a number of scenes which are of particular interest. Of these scenes you have collected information like the start frame and end frame and maybe a specific still frame. Further you wish to create saved searches which contain media records, and per record you want to list some scenes. Via the Axiell WebAPI you can store this information in a saved search, by using the structured XML type. For your custom information you can create any XML document and include it in the relevant <record> nodes. For example:
<adlibXML> <recordList> <record> <number>3</number> <title>My collection</title> <selection/> <owner>bert</owner> <hits>5</hits> <created>2010-07-23T08:29:41</created> <modified>2010-07-23T08:29:41</modified> <frequency/> <subject/> <expires>1970-01-01T00:00:00</expires> <prunemode>0</prunemode> <hitlist> <record priref="2"> <clips> <clip startframe="3445" endframe= "3785" stillframe="3505"/> <clip startframe="10125" endframe= "22620" stillframe="0"/> <clip startframe="31590" endframe= "39715" stillframe="38640"/> </clips> <record> <record priref="38"/> <record priref="172"/> <record priref="176"/> <record priref="179"/> </hitlist> <accesslist> <access> <name>erik</name> <rights>3</rights> </access> </accesslist> </record> </recordList> <diagnostic> <hits>0</hits> <xmltype>Undefined</xmltype> </diagnostic> </adlibXML>